// MFCSocketDlg_Client.h : header file
//
#pragma once
#include "../MyInclude/ClientSocket.h"
#include "resource.h"

// CMFCSocketDlg_Client dialog
class CMFCSocketDlg_Client : public CDialog
{
// Construction
public:
	CMFCSocketDlg_Client(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_MFCSOCKET_CLIENT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedBtnConnect();
	afx_msg void OnBnClickedBtnSend();
	afx_msg void OnBnClickedBtnStop();

public:
	CString m_ipAddress;
	int m_port;
	int m_clientID;

	CString sMsg;

	char szBuff[256];
	ClientSocket m_socket;

	afx_msg void SocketReceiveMessage(char* message);
	afx_msg void SocketSendMessage();
	afx_msg void SocketConnectServer();
	afx_msg void SocketStopConnected();
protected:
	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
};
